@extends('app')

@section('content')
    <form action="{{action('NewsController@store')}}" method="post" role="form" enctype="multipart/form-data">
        <input type="hidden" name="_token" value="{{ csrf_token() }}">
    <div class="container">
        <div class="row">
            <div class="col-md-12 col-md-offset-0">
                <div class="panel panel-primary">
                    <div class="panel-heading">新闻后台
                        <input  class="btn btn-primary col-md-offset-10 " type="submit" value="保存"   onclick="loading(this)">

                    </div>

                    <div class="panel-body">
                      @include('news.error')
                        @include('news.flash')
                        <div class="form-group">
                            <div class="input-group ">
                                <span class="input-group-addon" id="sizing-addon1" >标题</span>
                                <input type="text" name="title" class="form-control" placeholder="新闻标题" aria-describedby="sizing-addon1">
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-group ">
                                <span class="input-group-addon" id="sizing-addon1">摘要</span>
                                <textarea class="form-control"  name="abstract" rows="8">编辑新闻的摘要内容</textarea>
                            </div>
                        </div>
                        <div class="form-group">
                            <div class="input-group ">
                                <span class="input-group-addon" id="sizing-addon1">
                                    上传图片
                                   {{--<a href="{{action('NewsController@add')}}"  class="btn-sm">上传图片</a>--}}
                                </span>
                                <input type="file" name="fileName" class="form-control" >
                            </div>

                        </div>
                        <div class="form-group">
                            <div class="input-group ">
                                <span class="input-group-addon" id="sizing-addon1">内容</span>
                                <textarea class="form-control"    name="body" rows="35">编辑新闻内容</textarea>
                            </div>
                        </div>

                    </div>
                </div>
            </div>
        </div>
    </div>
    </form>

@endsection
